package com.course.controller;


import com.course.model.req.BaseReq;
import com.course.model.req.TestReqParam;
import com.course.utils.web.HttpAction;
import com.course.utils.web.HttpReq;
import com.course.utils.web.HttpRespCallBack;
import com.course.utils.web.MapBuilder;

public class TestController {

    static TestController instance;

    public static TestController getInstance() {
        if (instance == null) {
            instance = new TestController();
        }
        return instance;
    }

    public void test(String name, HttpRespCallBack httpRespCallBack) {
        HttpReq.getInstance().post(HttpAction.test.getValue(), new MapBuilder<String, Object>().add("name", name).getMap(),
                httpRespCallBack);
    }


    public void testPage(HttpRespCallBack httpRespCallBack) {
        HttpReq.getInstance().post(HttpAction.testPage.getValue(), null, httpRespCallBack);

    }
}
